The present invention relates to a storage subsystem, and more particularly to a disk array subsystem for performing a redundancy method and storing data.
Two method for storing redundant data in a storage subsystem are typically known. One is a mirror method for duplicating data. The other is a parity method in which parity data are generated from data.
Methods for storing redundant data in a disk array subsystem are illustrated in detail in literature: A Case for Redundant Arrays of Inexpensive Disks (RAID), 15 David A. Patterson, Garth Gibson, and Randy H. Katz, 1988 ACM 0-89791-268-3/88/0006/0109.
Advantages and disadvantages in using the mirror and parity methods in a disk array subsystem will be described below.
In storing redundant data by a mirror-based redundancy process, the data is duplicated by storing the same data in two different drives within the disk array subsystem. In storing redundant data by a parity-based redundancy process, parity data generated from the data are stored in a drive different from a drive in which the original data are stored (the parity data uses a smaller capacity than the original data). The mirror method provides better performance and availability, but is not an efficient use of capacity and is more expensive than the parity method. The parity method is less expensive, but is more disadvantageous in terms of performance and availability than the mirror method.
JP-A-7-84732 discloses a subsystem where both mirror-based storing of redundant data and parity-based storing of redundant data are present. JP-A-7-84732 also discloses techniques by which the subsystem can dynamically change the redundancy methods from mirror to parity and vice versa for its data. The redundancy method changing techniques allow users to store data in the subsystem with the best redundancy method selected in terms of trade-offs between cost, performance and availability.
The technique disclosed in JP-A-7-84732 requires that to change the data redundancy methods, data be transferred between data areas in which the data are stored by the different redundancy methods. FIG. 9 shows a process by which the disk array subsystem changes the redundancy method from mirror to parity. A disk array controller 102 (hereinafter referred to as xe2x80x9cDKCxe2x80x9d) transfers data from a mirror-based data storing area 207 to a parity-based data storing area 208. In the example shown in FIG. 9, transfer of data blocks 0, 1 and 2 requires that a single reading operation and four writing operations be effected with respect to magnetic disk drives (hereinafter referred to as the xe2x80x9cdrive(s)xe2x80x9d) including the generation and writing of parity data. Further, the data transfer occupies five drives 201, 203, 204, 205 and 206. As a result, the performance of the disk array subsystem is significantly impaired. To change the redundancy methods from parity to mirror, data stored by the parity method is first read and the read data is thereafter duplicated for mirror-based storing of redundant data and then is written. As a result, the performance of the subsystem is similarly impaired.
The object of the present invention is to allow a disk array subsystem capable of changing the redundancy method to reduce its loads caused by data transfer occurring when the redundancy method is changed.
A disk array subsystem according to the present invention has a plurality of drives for storing blocks of data supplied from a host apparatus, and a disk array controller for setting a plurality of storage areas each extending over the plurality of drives and for controlling the plurality of drives, and when the subsystem duplexes the blocks of data to record them in two of the storage areas, at least one of the two storage areas has data areas for storing the blocks of data included in the plurality of drives and a parity storing area for storing parity data prepared from the blocks of data included in at least one drive.
That is, the disk array subsystem according to the present invention is such that when the subsystem stores redundant data by duplicating, an area for storing parity data (hereinafter referred to as xe2x80x9cparity storing area(s)xe2x80x9d) prepared from the data to be stored is secured in at least one of the storage areas. No parity data have to be actually generated and stored in the parity storing areas as long as the data are duplicated.
To change the redundancy method from mirror to parity, the disk array subsystem according to the present invention reads one group of duplicated data, generates parity data from the read data and stores the generated parity data in the secured parity storing areas. Thereafter, of the storage areas in which the duplicated data are stored, the subsystem deletes the storage area storing no parity data. The other storage area can be treated as a storage area having parity-based redundant data by writing parity data therein.
Thus, according to the present invention, the redundancy method can be changed from mirror to parity only by reading data, generating parity data and writing the generated parity data. As a result, the present invention can dispense with the conventionally required steps of reading one group of duplicated data, generating parity data from the read data and writing both the read data and the generated parity data.
On the other hand, to change the redundancy method from parity to duplicating, the disk array sub-system of the present invention copies data stored in one storage area that has both data areas for storing the data and parity storing areas for storing parity data generated from the data into the other storage area to thereby duplicate the data both in the source storage area and in the copied-data storage area.
To change the redundancy method from parity to duplicating, the conventional disk array subsystem first read parity-based redundant data and thereafter duplicated the read data, and thus the duplicated data had to be written in two places. However, in the present invention a storage area having both data and parity data generated from such data is used as one of the duplicated storage areas. Therefore, there is no need to write the data in the two storage areas for duplicating. That is, the present invention can change the redundancy method only by writing the data in one storage area.